package eva.savant.business.contabilidad.view

import eva.savant.businessobject.ad.Usuario
import eva.savant.businessobject.cg.Caja
import eva.savant.businessobject.cg.Cajero
import eva.savant.core.view.Maestro

import javax.faces.bean.ManagedBean
import javax.faces.bean.SessionScoped
import javax.annotation.PostConstruct
import javax.faces.convert.Converter

@SessionScoped
@ManagedBean(name = 'IMCajero')
public class IMCajero extends Maestro {

  def lsCaja

  @PostConstruct
  public void cleanEntity() {

    entity = new Cajero(); init()

    entity.usuario= new Usuario()

    entity.caja= new Caja()

    lsCaja= find(Caja,'')
  }

  public List complete(String value) { return completeLike(Usuario,'persona.nombre',value) }

  public Converter getConverter() { return converterLike(Usuario) }

}
